from flask import Flask, make_response, render_template, jsonify
app = Flask(__name__)

@app.errorhandler(404)
def not_found(error):
    resp = make_response(render_template('error.html'), 404)
    resp.headers['X-Something'] = 'A value'
    return resp

@app.route('/me')
def me_api():
    return {
        "username": "aaa",
        "theme": "bbb",
        "image": "ccc"
    }

@app.route('/users')
def users_api():
    users = [{'name':'aaa'},{'name':'bb'},{'name':'accc'}]
    return jsonify(users)


if __name__ == "__main__":
    app.run(host='0.0.0.0', port=8000, debug=True)